package cn.com.kisen.spring.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.com.kisen.spring.domain.User;
import cn.com.kisen.spring.mapper.UserMapper;

/**
 * @author jiangz
 *
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public User loadById(Long userId) {
        return userMapper.loadById(userId);
    }

    public void deleteById(Long userId) {
        userMapper.deleteById(userId);
    }

    public User save(User user) {
        userMapper.save(user);
        return user;
    }

    public User update(User user) {
        userMapper.update(user);
        return user;
    }
}
